﻿/****************************************************************************************************
	Copyright (C) 2010 RapidWebDev Organization (http://rapidwebdev.org)
	Author: Eunge, Legal Name: Jian Liu, Email: eunge.liu@RapidWebDev.org

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ****************************************************************************************************/

using System.Runtime.Serialization;

namespace RapidWebDev.SearchIndex.Contract
{
	/// <summary>
	/// Search filter operator enumeration.
	/// </summary>
	[DataContract(Namespace = ServiceNamespaces.SearchIndexNamespace)]
	public enum SearchFilterOperators
	{
		/// <summary>
		/// The field of matching documents should contain any terms in the filter values.
		/// </summary>
		[EnumMember]
		Any = 0,

		/// <summary>
		/// The field of matching documents should contain all the filter values.
		/// </summary>
		[EnumMember]
		All = 1,

		/// <summary>
		/// The field of matching documents should have a term which likes the filter value.
		/// </summary>
		[EnumMember]
		Like = 3,

		/// <summary>
		/// The field of matching documents should be between the two filter values.
		/// </summary>
		[EnumMember]
		Between = 4,

		/// <summary>
		/// The field of matching documents should not contain any the filter values.
		/// </summary>
		[EnumMember]
		Exclude = 5,

		/// <summary>
		/// The field of matching documents should be greater equal than the filter value.
		/// </summary>
		[EnumMember]
		GreaterEqualThan = 6,

		/// <summary>
		/// The field of matching documents should be greater than the filter value.
		/// </summary>
		[EnumMember]
		GreaterThan = 7,

		/// <summary>
		/// The field of matching documents should be less equal than the filter value.
		/// </summary>
		[EnumMember]
		LessEqualThan = 8,

		/// <summary>
		/// The field of matching documents should be less than the filter value.
		/// </summary>
		[EnumMember]
		LessThan = 9,
	}
}